1. Technology Field
The present invention relates to a data writing method for a flash memory and a flash memory control circuit and a flash memory storage system using the same.
2. Description of Related Art
Along with the widespread of digital cameras, cell phones, and MP3 in recently years, the consumers' demand to storage media has increased drastically. Flash memory is one of the most adaptable memories for such battery-powered portable products due to its characteristics such as data non-volatility, low power consumption, small volume, and non-mechanical structure. A solid state drive (SSD) is a storage device which uses a NAND flash memory as its storage medium.
Generally speaking, a flash memory chip in a flash memory storage device has a plurality of physical blocks, and a flash memory controller of the flash memory storage device logically groups these physical blocks into a system area, a data area, a spare area, and a replacement area. The physical blocks in the system area are configured to store information related to the flash memory storage device, and the physical blocks in the replacement area are configured to replace damaged physical blocks in the data area and the spare area. Thus, a host system cannot access the physical blocks in the system area and the replacement area in general access states. The physical blocks in the data area are configured to store valid data written by write commands, and the physical blocks in the spare area are configured to substitute the physical blocks in the data area when the write commands are executed. To be specific, when the flash memory storage device receives a write command from the host system and accordingly is about to update (or write) data in a physical block in the data area, the flash memory storage device selects a physical block form the spare area, moves the valid old data originally stored in the physical block of the data area to be updated to the physical block selected from the spare area, and then writes the new data into the physical block selected from the spare area. After that, the flash memory storage device logically links the physical block containing the new data to the data area, erases the physical block in the data area to be update and links it to the spare area. The flash memory storage device provides logical blocks to the host system in order to allow the host system to successfully access the physical blocks that are alternatively configured to store data. Namely, the flash memory storage device reflects the alternation of the physical blocks by recording and updating the mapping relationship between the logical blocks and the physical blocks of the data area in a logical block-physical block mapping table, so that the host system simply accesses data in the provided logical block while the flash memory storage device actually accesses data in the corresponding physical block according to the logical block-physical block mapping table.
However, the capacity of each physical block has been increased along with the advancement of flash memory fabricating process. As a result, the time required for moving foregoing old valid data is increased, and accordingly the time required by the flash memory storage device for executing a write command from the host system may exceed the specified time of a flash memory storage product (for example, a SD memory card). Thereby, how to shorten the time required by a flash memory storage device for executing a write command is one of the major subjects in the industry.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.